package com.deng.api.controller;

import com.deng.api.service.ICloudCityService;
import com.deng.commons.common.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author deng
 * @since 2022-08-10
 */
@RestController
@Api(tags = "城市管理操作")
@RequestMapping("/api/city")
public class CloudCityController {
    @Resource
    private ICloudCityService iCloudCityService;

    @GetMapping("/all")
    @ApiOperation("获取所有城市信息")
    public BaseResult getDeptAll(@RequestParam(defaultValue = "1") Integer page,
                                 @RequestParam(defaultValue = "10") Integer size,
                                 String name){
        return iCloudCityService.getCityAll(page,size,name) ;
    }
}
